<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/radardevice/devices/commandlog.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/radardevice/devices/commandlog.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'id',
                footer: "Foots",
                cnName: '指令记录',
                name: 'devices/commandlog',
                url: "/commandlog/",
                sortName: "createTime"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"deviceNo":"","flag":"","createTime":""});
            const searchFormOptions = ref([[{"title":"设备编号","field":"deviceNo","type":"like"},{"dataKey":"commandFlag","data":[],"title":"指令标志","field":"flag","type":"select"}],[{"title":"添加时间","field":"createTime","type":"datetime"}]]);
            const columns = ref([{field:'id',title:'主键',type:'string',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'deviceNo',title:'设备编号',type:'string',width:160,readonly:true,align:'left',sort:true},
                       {field:'flag',title:'指令标志',type:'int',bind:{ key:'commandFlag',data:[]},width:80,readonly:true,align:'left'},
                       {field:'controlStr',title:'控制字节',type:'string',width:80,readonly:true,align:'left'},
                       {field:'commandStr',title:'上传指令',showOverflowTooltip:'true',type:'string',width:320,readonly:true,align:'left'},
                       {field:'createTime',title:'添加时间',type:'datetime',sort:true,width:130,readonly:true,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
